//
//  PhoneUtils.m
//  MyFamework
//
//  Created by carlos on 13-4-17.
//  Copyright (c) 2013年 carlos. All rights reserved.
//

#import "PhoneUtils.h"
#import "ReferenceUtils.h"
@implementation PhoneUtils

//拨打电话
+(void)callPhone:(NSString *)mPhoneNum
{
    //去掉-
    mPhoneNum = [mPhoneNum stringByReplacingOccurrencesOfString:@"-" withString:@""];
    //去掉空格
    mPhoneNum = [mPhoneNum stringByReplacingOccurrencesOfString:@" " withString:@""];
    CLog(@"phonenum = %@",mPhoneNum);
    NSURL *phoneURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",mPhoneNum]];
    
    [[UIApplication sharedApplication] openURL:phoneURL];
}
//是否是iPhone
+(BOOL)isPhone{
    return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone;
}

@end
